<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="../css/jszl_dataManagement.css">
    <link rel="stylesheet" href="../font/iconfont/font_wfwf1mhqz7/iconfont.ttf">
    <link rel="stylesheet" href="../font/iconfont/font_wfwf1mhqz7/iconfont.css">
    <!-- <link rel="stylesheet" href="../libs/bootstrap-3.4.1-dist/css/bootstrap.min.css"> -->
    <!-- <script src="./libs/bootstrap-3.4.1-dist/js/bootstrap.min.js"></script> -->
    <script src="../js/jquery-3.1.1.js"></script>
    <script src="../js/allData.js"></script>
    <script src="../js/utils.js"></script>

    <title>技术资料-资料管理</title>
</head>

<body>
    <div id="mainDiv">
        <div>
            <div><span>资料管理</span></div>
            <div><button onclick="window.location.href='./jszl_addTheData.html'" target="myiframe">添加资料</button></div>
            <div class="clear">
                <div>
                    <span>资料名称</span>
                    <input type="text" placeholder="请输入资料名称">
                </div>
                <div>
                    <span>装备型号</span>
                    <select name="" id="">
                        <option value="">全部</option>
                        <option value="">维修1部</option>
                        <option value="">维修2部</option>
                        <option value="">维修3部</option>
                    </select>
                </div>
                <div>
                    <span>装备型号</span>
                    <select name="" id="">
                        <option value="">全部</option>
                        <option value="">装备使用</option>
                        <option value="">装备制度</option>
                    </select>
                </div>
                <div>
                    <button><span class="iconfont icon-zhongzhi">重置</span> </button>
                    <button><span class="iconfont icon-chaxun">查询</span> </button>
                </div>
            </div>
        </div>
        <table id="myTable">
            <thead>
                <tr>
                    <th>资料名称</th>
                    <th>资料类别</th>
                    <th>专业类别</th>
                    <th>装备型号</th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody>
            </tbody>
        </table>
        <div class="myPage clear">
            <!-- 
            <div class="page" onclick="showTable(${i})">${i}</div>
            <div class="page" onclick="showTable(${i})">${i}</div>
            -->
        </div>
    </div>
    <script>
        // 1.先在login界面中把需要的数据存储至本地存储
        // 2.从本地存储中获取数据
        let arrGetData = getData('arrManagement')
        // 一页装多少条数据
        let dat_num = 10;
        // 起始页
        let qishi;
        // 装最大页码
        var maxPage = getMaxPage(arrGetData, dat_num);
        // 用来装每一页显示的数据
        let arr = [];
        // 用来装当前页的页码
        let dangqianye;
        // 用来装页码的一个数组
        let arrPage = [];


        // 渲染页码
        showPage(maxPage)
        // 根据页码来渲染表格
        showTable(1)

        // 由本地数据转换成的JSON数据算出最大页码(一页10条数据)
        // let maxPage = getMaxPage(jszl_dataManagement, 10)
        // console.log(maxPage + '页');


    </script>
</body>

</html>